<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>反转</title>
	</head>

	<body>
		<script>
			var a = prompt("请输入一个整数");
			for(var i = a.length-1; i >= 0; i--) {
				document.write(a.charAt(i));
			}
		</script>
	</body>

</html>